<template>
  <div v-cloak id="app">
    <router-view/>
    <toolbar
      v-if="$route.path == '/member'|| $route.path == '/insurances'"
      :grade = "userGrade"
    />
    <cover :isShowMask = "isShowMask" />
  </div>
</template>

<script>
import cover from "@/components/mask/mask"
import toolbar from "@/components/toolbar/toolbar"
import { mapGetters } from 'vuex'

export default {
  name: 'App',
  created(){

  },
  mounted() {
    const type = this.$route.query.type

  },
  components:{
       cover, toolbar
  },
  computed: {
    ...mapGetters(['isShowMask', 'userGrade'])
  },
  methods: {

  },
  watch: {
    $route(to, from) {
      var title = document.getElementsByTagName("title")[0];
      if (to.meta && to.meta.title) title.innerHTML = to.meta.title;
    }
  }
}
</script>

<style lang="less">
  @import './assets/css/normalize.less';
  [v-cloak] {
    display: none;
  }
  body::-webkit-scrollbar, html::-webkit-scrollbar {display:none}
  @import 'element-ui/lib/theme-chalk/index.css' ;
</style>
